package com.liushuai.eas.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.text.SimpleDateFormat;
import java.util.Date;

@Data
@TableName("assistant")
public class Assistant {

    @TableId(type = IdType.AUTO)
    private Integer id;
    private String username;
    private String password;
    private String sex;
    private Date birthday;
    private Date joinData;
    private String identity;

    public String getBirthday() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(birthday);
    }

    public String getJoinData() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(joinData);
    }

}
